<?php
$this->headTitle($this->translate('Settings'));
$fm = $this->flashMessenger();
?>
<div class="text">
<?  if ($fm->hasCurrentMessages() || $fm->hasMessages()): ?>
    <div class="messages notice-messages">
        <ul>
<?      foreach ($fm->getCurrentMessages() as $message): ?>
            <li><?= $message; ?></li>
<?      endforeach; ?>
<?      foreach ($fm->getMessages() as $message): ?>
            <li><?= $message; ?></li>
<?      endforeach; ?>
        </ul>
    </div>
<?  $fm->clearMessages(); $fm->clearCurrentMessages(); ?>
<?  endif; ?>
<?= $this->form; ?>
</div>
<? $this->headScript()->captureStart(); ?>
        $(document).ready(function() {
            $('form input[name="birthday"]').each(function() {
                $(this).datepicker({
                    dateFormat: 'yy-mm-dd',
                    firstDay: 1,
                    mandatory: false,
                    yearRange: '-100:+1',
                    
                    closeText: 'X',
                    closeStatus: '<?= $this->translate('Close'); ?>',
                    prevText: '&lt;--',
                    nextText: '--&gt;',
                    currentText: '<? $this->translate('Now') ?>',
                    
                    monthNames: <?= Zend_Json::encode($this->monthNames); ?>,
                    dayNames: <?= Zend_Json::encode($this->dayNames); ?>,
                    dayNamesMin: <?= Zend_Json::encode($this->dayNamesMin); ?>
                    
                });
            });
        });
<? $this->headScript()->captureEnd(); ?>